import requests
from lxml import etree

for i in range(1, 16):
    url = 'https://search.sina.com.cn/news'
    res = requests.post(url, data={
        'q': '理想车主',
        'c': 'news',
        'adv': 0,
        'size': 10,
        'sort': 'rel',
        'page': i
    })
    tree = etree.HTML(res.text)
    lines = tree.xpath('//h2/a')
    for line in lines:
        print(''.join(line.xpath('.//text()')))
